//package com.ruibang.glass.quality.component.job;
//
//import com.ruibang.glass.quality.constant.Constants;
//import com.ruibang.glass.quality.domain.req.DiscardDefectReq;
//import com.ruibang.glass.quality.service.TotalEquDataService;
//import com.teaming.cloud.framework2.elastic.job3.annotation.ElasticJobScheduler;
//import lombok.extern.slf4j.Slf4j;
//import org.apache.shardingsphere.elasticjob.api.ShardingContext;
//import org.apache.shardingsphere.elasticjob.simple.job.SimpleJob;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//
//import java.time.LocalDate;
//import java.time.format.DateTimeFormatter;
//
///**
// * @Author: songJinKang
// * @CreateTime: 2024-01-30  09:29
// * @Description: TODO:热端判废缺陷（每小时）
// * @Version: 1.0
// */
//
//@Slf4j
//@ElasticJobScheduler(cron = "6 40 0/1 * * ?", name = "EveryHourHotScrapJudgmentDefectTask", shardingItemParameters = "0=0", jobParameters = "parameter")
////@ElasticJobScheduler(cron = "6 * * * * ?", name = "EveryHourHotScrapJudgmentDefectTask", shardingItemParameters = "0=0", jobParameters = "parameter")
//@Component
//public class EveryHourHotScrapJudgmentDefectTask implements SimpleJob {
//
//    @Autowired
//    private TotalEquDataService totalEquDataService;
//
//    @Override
//    public void execute(ShardingContext shardingContext) {
//        LocalDate now = LocalDate.now();
//        String startDate = now.minusDays(Constants.DEFECT_DEFAULT_QUERY_DAYS).format(DateTimeFormatter.ISO_LOCAL_DATE);
//        String endDate = now.format(DateTimeFormatter.ISO_LOCAL_DATE);
//        DiscardDefectReq defectReq = new DiscardDefectReq();
//        defectReq.setStartDate(startDate);
//        defectReq.setEndDate(endDate);
//        defectReq.setCheckMachineCode("CM2");
//        //检查机类型0:冷端，1:热端
//        defectReq.setCheckMachineType(Constants.ONE_STR);
//        //检查机类型0:半成品，1:成品
//        defectReq.setIsFinished(Constants.ZERO_STR);
//        //调用
//        totalEquDataService.importEveryHourDiscardDefect(defectReq);
//    }
//
//}
